package singotonPattern;

public class Main {
    public static void main(String[] args) {
        Singleton01.getInstance().get();    // 饿汉式
        Singleton02.getInstance().get();     // 懒汉式

        Apple apple_1 = Singleton01.getInstance();
        Apple apple_2 = Singleton01.getInstance();
        System.out.println(apple_1 == apple_2); // true
    }
}
